package model;

public class Coordinate {
	
	private double x;
	private double y;
	
	public Coordinate (double _x, double _y) {
		this.x = _x;
		this.y = _y;
	}

	public double getX() {
		return x;
	}

	public void setX(double x) {
		this.x = x;
	}

	public double getY() {
		return y;
	}

	public void setY(double y) {
		this.y = y;
	}

	// calculando distancia euclidiana
	public double euclidianDistance(Coordinate coord) {
		return Math.sqrt( Math.pow (this.x - coord.getX(), 2) 
				+ Math.pow(this.y - coord.getY(), 2) );
	}

}
